<!--
Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div id="page-content" class="content" style="padding: 25px;">

    <style>
body {
    font-size: 13px;
}

.box {
    overflow-x: scroll;
    overflow-y: scroll;
}
</style>

    <div class="box">
        <h1 class="heading-page">Committed Submissions</h1>
        <div>
            <button
                style="margin-left: 25px; margin-top: 4px; float: right; background-color: #337ab7;"
                type="submit" class="btn-alt btn-small"
                ng-click="refreshCommittedSubmissions()">Refresh</button>
        </div>
        <table ng-table="tableParams" class="table" show-filter="true">
            <tr ng-repeat="submission in $data">
                <td title="'Id'" filter="{ submissionId: 'text'}"
                    sortable="'submissionId'">{{
                    submission.submissionId }}</td>
                <td title="'Timeslot'" filter="{ timeslot: 'text'}"
                    sortable="'timeslot'">Lab: {{
                    submission.timeslot.labInfo.lab }} Start date and
                    time: {{ submission.timeslot.startDateTime }} <!-- duration(in sec) :
                                {{submission.timeslot.duration}}-->
                </td>
                <td title="'Blueprint Name'">{{
                    submission.validationDbTestResult.blueprintInstance.blueprint.blueprintName
                    }}</td>
                <td title="'Version'">{{
                    submission.validationDbTestResult.blueprintInstance.version
                    }}</td>
                <td title="'Layer(s)'">{{
                    getLayer(submission.validationDbTestResult) }}</td>
                <td title="'Optional Test Cases'">{{
                    submission.validationDbTestResult.optional}}</td>
                <td title="'Status'" filter="{ status: 'text'}"
                    sortable="'status'">{{
                    submission.submissionStatus }}</td>
                <td title="'Nexus URL result'"><a
                    href="{{getResultUrl(submission)}}">{{getResultUrl(submission)}}</a></td>
                <td title="'Result'">
                    <button
                        style="margin-left: 25px; margin-top: 4px; float: right; background-color: #337ab7;"
                        type="submit" class="btn-alt btn-small"
                        ng-click="getValidationResults(submission);">{{
                        mapResult(submission.validationDbTestResult)}}</button>
                </td>
            </tr>
        </table>
    </div>

</div>